function creattePost({title , body}){
    fetch('https://josnplaceholder.typicode.com/posts',{
        method:'POST',
        body:JSON.stringify({
            title,
            body,
        }),
        headers:{
            'Content-Type':'application/json',
            token:'abc123',
        },
    })
    .then((res)=>res.json())
    .then((date)=>console.log(date));
}

creattePost({title:'My Post',body:'This is my Post'});